//
//  Ball.h
//  billiards
//
//  Created by Matsumae Kentaro on 12/03/20.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "BodyNode.h"
#import "BallTracer.h"

@class Ball;

extern int    _currentBallTag;

@interface Ball : BodyNode <CCTargetedTouchDelegate> {
    bool moveToFinger;
    CGPoint fingerLocation;
    float ballRadius;
    ccColor3B originalColor;
    BOOL isInHall;
    
    int moveUser;
    
    BOOL canTouch;
    
    BallTracer* ballTracer;
    
    b2World* world_;
    
    int heart;
    int damage;
}
@property BOOL isInHall;
@property (nonatomic,readwrite) int moveUser;
@property (nonatomic, assign) int heart;
@property (nonatomic, assign) int damage;

+(id)ballWithWorld:(b2World*)world at:(CGPoint)pos touchable:(BOOL)touchable type:(int) type;
+(id)ballWithWorld:(b2World*)world at:(CGPoint)pos color:(ccColor3B)color type:(int) type;

+(CGFloat)ballWidth;

-(void)createBallInWorld:(b2World*)world at:(CGPoint)pos color:(ccColor3B)color type:(int) type;

-(void)resetColor;

-(BOOL) isTouchForMe:(CGPoint)location;
-(void) removeTouchDelete;

@end
